<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/util.jsp"%>
<script type="text/javascript">
    function jumpPage(pageIndex) {
      window.location.href='${cdnctx}/systemCollectArea/chooseLight.shtml?pageIndex='+pageIndex;
    }
    $(function(){
        $("#lightTable tbody tr").click(function(){
            $(this).attr("class","odd").siblings().attr("class","even");
        });
        // $("#lightTable tbody tr").mouseout(function(){
        //     $(this).attr("class","even");
        // })
        // $("#lightTable tbody tr").dblclick(function(){
        //     console.log($(this).attr("lightId")+","+$(this).attr("lightCode"));
        //     art.dialog({id : 'chooseTraditionLight'}).hide();
        //     art.dialog({id : 'chooseLedLight'}).hide();
        // })
    })
</script>
<body class="main">
    <div class="main-mid">
        <div class="css_contentDiv">
            <form id="searchLoginForm" action="${cdnctx}/systemCollectArea/chooseLight.shtml" method="post">
                <div class="searchArea b-border-radius" style="padding:10px;">
                    <span>灯具编号：</span> 
                    <input id="lightcode" name="lightcode"  type="text" class="inputText b-border-radius a-box-shadow" size="15" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="submit" class="b-inputButton" value="查&nbsp;询" />
                </div>
            </form>
            <div class="divTable a-border-radius b-box-shadow">
                <div style="height:400px;background-color:white">
                    <table id="lightTable" width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable" style="cursor: pointer;">
                        <thead>
                            <tr>
                              <td>灯具编号</td>
                              <td>灯具名称</td>
                              <td>功率</td>
                              <td>色温</td>
                              <td>备注</td>
                            </tr>
                        </thead>
                        <tbody>
                        <c:if test="${empty(list) }">
                            <tr class="even" align="center" style="color:red">
                                <td colspan="7" class="no-data" style="height: 300px;"></td>
                            </tr>
                        </c:if>
                        <c:if test="${not empty(list) }">
                        <c:forEach items="${list}" var="entity" varStatus="status">
                            <tr class="even" lightId="${entity.id }" lightName="${entity.lightname }">
                                <td>${entity.lightcode }</td>
                                <td>${entity.lightname }</td>
                                <td>${entity.lighttype }</td>
                                <td>${entity.power }</td>
                                <td>${entity.memo }</td>
                            </tr>
                        </c:forEach>
                        </c:if>
                        </tbody>
                    </table>
                </div>
                <c:if test="${not empty(list) }">
                <div id="pageInfo" class="pageJump">
                    <script type="text/javascript">
                        pagination.getPaginationHtml('JavaScript:jumpPage({0})',${pageIndex},${pageCount},'pageInfo');
                    </script>
                    <c:if test="${!empty(list) }">
                        共有${dataCount}条数据
                    </c:if>
                </div>
                </c:if>
            </div>
        </div>
    </div>
    <!--首页框架页尾部分↓-->
    <%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
    <!--首页框架页尾部分↑-->
</body>
</html>